package com.plug.repository;

import com.plug.entity.PlugBackupRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface PlugBackupRecordMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(PlugBackupRecord record);

    int insertSelective(PlugBackupRecord record);

    int insertBatch(List<PlugBackupRecord> list);

    PlugBackupRecord selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(PlugBackupRecord record);

    int updateByPrimaryKey(PlugBackupRecord record);

    int findTotal();
    int findSum(String actionType);

    List<Map<String, Object>> findByPage(@Param("offset")Integer offset,@Param("limit")Integer limit);

    List<Map<String, Object>>  pages(Map<String,Object> map);
    /**
     *根据备份任务id查询和间隔时间查询
     * @param minute
     * @param plugContrastId
     * @return PlugBackupRecord
     */
    PlugBackupRecord selectByBackupsAndMinuteInfo(@Param("minute") Integer minute,@Param("plugContrastId")Integer plugContrastId);
    List<PlugBackupRecord> dddd(@Param("plugContrastId")Integer plugContrastId);

    List<Map<String,Object>> findActionType();

    List<Map<String,Object>> selectByActionType(@Param("actionType")String actionType);

}